#include<iostream>
using namespace std;

// 基类People
class People
{
public:
    People(char*name,int age):m_name(name),m_age(age)
    {

    }
protected:
    char* m_name;
    int m_age;
};

// 派生类 Student
class Student:public People
{
public:
    Student(char* name,int age,float score):People(name,age),m_score(score)
    {

    }
    void display()
    {
        cout<<m_name<<"的年龄是"<<m_age<<",成绩是"<<m_score<<"。"<<endl;
    }
private:
    float m_score;
};

int main()
{
    Student stu("小明",16,90.5);
    stu.display();
    return 0;
}
